how to check if a value exists in map golang

181

how to check if a value exists in map golang -

if val, ok := dict["foo"]; ok {
    //do something here
}

Comments

Submit
0 Comments